<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="/files/docs-assets/ico/favicon.png">

    <title>JDchat_{% block title %}{% endblock %}</title>

    <!-- Bootstrap core CSS -->
    <link href="/files/dist/css/bootstrap.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="/files/dist/css/jumbotron.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <ul class="nav navbar-nav">
           <li><a class="navbar-brand" href="/">JDchat</a></li>
           <li class="active"><a href="/">首页</a><li>
           <li><a href="/product_list/">最新推荐</a></li>
           <li><a href="/myblog/">我的博文</a></li>
           <li><a href="#" data-toggle="dropdown">网络测试 <b class="caret"></b></a>
            <ul class="dropdown-menu">
             <li><a href="/ping_test/">Ping测试</a></li>
             <li><a href="/netcard_info/">网卡信息</a></li>
             <li><a href="#">路由表</a></li>
             <li class="divider"></li>
             <li><a href="/sys_info/">设备信息</a></li>
            </ul>
           </li>
          </ul>
        </div>
        {% if user.is_authenticated %}
        <div class="navbar-collapse collapse">
          <div class="pull-right">
           <a href=#>欢迎您：{{ user }}</a>
           <a class="btn btn-danger" href="/logout/">注销</a>
          </div>
        </div>
        {% else %}
        <div class="navbar-collapse collapse">
          <form class="navbar-form navbar-right" role="form" method="post" action="/login/">
              {% csrf_token %}
            <div class="form-group">
              <input type="text" placeholder="用户名" class="form-control" name="username">
            </div>
            <div class="form-group">
              <input type="password" placeholder="密码" class="form-control" name="password">
            </div>
            <button type="submit" class="btn btn-success">登录</button>
          </form>
        </div>
        <!--/.navbar-collapse -->
        {% endif %}
      </div>
    </div>
    <div class="container">
      <div class="content">
        <div class="page-header">
          <h1>{% block pagename %}{% endblock %}</h1>
        </div>
        {% block content %}
        内容
        {% endblock %}
      </div><!-- /content -->
    </div>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script src="/files/dist/js/bootstrap.min.js"></script>
  </body>
</html>
